package com.testplatfrom.project.enumproject.environment;

public enum  JsonPathEnum {
    CONTAIM("包含","contain"),
    NOCONTAIM("不包含","nocontain"),
    EQUATION("相等","equation"),
    NOEQUATION("不相等","noequation"),
    GT("大于","gt"),
    LT("小于","lt"),
    REGULAR("正则匹配","regular")
    ;
    private String message;

    private String method;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    JsonPathEnum(String message, String method) {
        this.message = message;
        this.method = method;
    }


    public static JsonPathEnum getByKey(String message){
        for (JsonPathEnum assertMethodsType:values()){
            if (message.equals(assertMethodsType.getMessage())){
                return assertMethodsType;
            }
        }
        return null;
    }
}
